package com.tom.feign.clients;


import com.tom.domain.Login;
import com.tom.dto.LoginAndMealIdDto;
import com.tom.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * feign的接口里面的方法必须和要调用的微服务的controller中的方法一摸一样
 */
@FeignClient(value = "service-auth", fallbackFactory = FallbackFactorySystem.class)
public interface LoginFeignClient {
    @RequestMapping(value="/login/save",method= RequestMethod.POST)
    AjaxResult save(@RequestBody Login login);

    @RequestMapping(value="/login/saveLoginAndMeal",method= RequestMethod.POST)
     AjaxResult saveLoginAndMeal(@RequestBody LoginAndMealIdDto loginAndMealIdDto);

}
